package it3807.semOppg1;

import java.io.IOException;

import org.apache.lucene.store.Directory;

public class Main {


	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String dirs[] = new String[1];
		
		dirs[0] = "z:/wikimedia-full-test";
		DocIndexer indexer = new DocIndexer(dirs, "index");
		try {
			indexer.generateIndex();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
		
		Directory indexedDir = indexer.getIndexedDir();
		
		
		DocSearch search = null;
		try {
			search = new DocSearch(indexedDir);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
		
		new RequestServer(5555, search);

	}

}
